package com.wendy.common.dao.mybatis.api;

import com.wendy.common.core.api.PageInterceptorApi;
import com.wendy.common.core.context.PageContextHolder;
import com.wendy.common.core.page.PageBO;
import org.springframework.stereotype.Component;

@Component
public class MybatisPlusHelperInterceptorImpl implements PageInterceptorApi {
    @Override
    public boolean startPage(PageBO bo) {
        PageContextHolder.set(bo);
        return true;
    }

    @Override
    public boolean removePage() {
        PageContextHolder.remove();
        return true;
    }
}
